<?php
    include "/opt/lampp/htdocs/news/utils/db.php";
    $id =@$_GET['id'];
    if(!isset($id)){
    echo"id不能为空";
    }

    $sql = "delete from user where id= $id";
    $db = new DB();
    $result = $db->delete($sql);
    if($result){
        echo"删除成功";
    }else{
        echo"删除失败";
    }
?>